import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { eRoutePaths } from 'joy-abpui-angular';

const routes: Routes = [
  {
    path: eRoutePaths.Account,
    loadChildren: () => import('joy-abpui-angular').then(m => m.AccountModule),
  },
  {
    path: eRoutePaths.Identity,
    loadChildren: () => import('joy-abpui-angular').then(m => m.IdentityModule),
  },
  {
    path: eRoutePaths.TenantManagement,
    loadChildren: () => import('joy-abpui-angular').then(m => m.TenantManagementModule),
  },
  {
    path: eRoutePaths.SettingManagement,
    loadChildren: () => import('joy-abpui-angular').then(m => m.SettingManagementModule),
  },
  {
    path: '',
    pathMatch: 'full',
    loadChildren: () => import('joy-abpui-angular').then(m => m.LayoutModule),
  },
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
  exports: [RouterModule],
})
export class AppRoutingModule {}
